<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>EOS.IO: contracts/eoslib/message.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN1.1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_ae9b15dd87e066e1908bbd90e8f38627.html">contracts</a></li><li class="navelem"><a class="el" href="dir_3fea0bf1ce879ce73e6ecec98007efcd.html">eoslib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">message.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="message_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="message_8h.html">eoslib/message.h</a>&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="print_8hpp.html">eoslib/print.hpp</a>&gt;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceeos.html">eos</a> {</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;   <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="group__messagecppapi.html#ga82362482cd5c990d4b25708a96f72c32">   39</a></span>&#160;   T <a class="code" href="group__messagecppapi.html#ga82362482cd5c990d4b25708a96f72c32">currentMessage</a>() {</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;      T value;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;      <span class="keyword">auto</span> read = <a class="code" href="group__messagecapi.html#ga95a7d555722669cdeb72d6d6d1236893">readMessage</a>( &amp;value, <span class="keyword">sizeof</span>(value) );</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;      <a class="code" href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a>( read &gt;= <span class="keyword">sizeof</span>(value), <span class="stringliteral">&quot;message shorter than expected&quot;</span> );</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;      <span class="keywordflow">return</span> value;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;   }</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;   <a class="code" href="group__messagecapi.html#gaed0ef9b019ed08c7cc0241c5b4169f13">using ::requireAuth</a>;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;   <a class="code" href="group__messagecapi.html#gaeb32e8229c58b2b2b045080dc1d4b850">using ::requireNotice</a>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;   <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... <a class="code" href="group__currencyapi.html#gae8a6922db493041a75e8de97c672eab5">Accounts</a>&gt;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="group__messagecppapi.html#ga547d525494d3cd50fecc7ce919df5b43">   65</a></span>&#160;   <span class="keywordtype">void</span> <a class="code" href="group__messagecppapi.html#ga547d525494d3cd50fecc7ce919df5b43">requireNotice</a>( <a class="code" href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a> name, <a class="code" href="group__currencyapi.html#gae8a6922db493041a75e8de97c672eab5">Accounts</a>... accounts ){</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;      <a class="code" href="group__messagecppapi.html#ga547d525494d3cd50fecc7ce919df5b43">requireNotice</a>( name );</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;      <a class="code" href="group__messagecppapi.html#ga547d525494d3cd50fecc7ce919df5b43">requireNotice</a>( accounts... );</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;   }</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;} <span class="comment">// namespace eos</span></div><div class="ttc" id="group__systemcapi_html_gae2a6ebaf48fe7c69f847ae18f109d09a"><div class="ttname"><a href="group__systemcapi.html#gae2a6ebaf48fe7c69f847ae18f109d09a">assert</a></div><div class="ttdeci">void assert(uint32_t test, const char *cstr)</div><div class="ttdoc">Aborts processing of this message and unwinds all pending changes. </div></div>
<div class="ttc" id="print_8hpp_html"><div class="ttname"><a href="print_8hpp.html">print.hpp</a></div></div>
<div class="ttc" id="group__types_html_gad67b43dc23285b01176f4c181c59fc23"><div class="ttname"><a href="group__types.html#gad67b43dc23285b01176f4c181c59fc23">AccountName</a></div><div class="ttdeci">uint64_t AccountName</div><div class="ttdef"><b>Definition:</b> types.h:24</div></div>
<div class="ttc" id="group__messagecapi_html_gaeb32e8229c58b2b2b045080dc1d4b850"><div class="ttname"><a href="group__messagecapi.html#gaeb32e8229c58b2b2b045080dc1d4b850">requireNotice</a></div><div class="ttdeci">void requireNotice(AccountName name)</div><div class="ttdoc">Add the specified account to set of accounts to be notified. </div></div>
<div class="ttc" id="message_8h_html"><div class="ttname"><a href="message_8h.html">message.h</a></div></div>
<div class="ttc" id="group__messagecapi_html_ga95a7d555722669cdeb72d6d6d1236893"><div class="ttname"><a href="group__messagecapi.html#ga95a7d555722669cdeb72d6d6d1236893">readMessage</a></div><div class="ttdeci">uint32_t readMessage(void *msg, uint32_t len)</div><div class="ttdoc">Copy current message to the specified location. </div></div>
<div class="ttc" id="group__currencyapi_html_gae8a6922db493041a75e8de97c672eab5"><div class="ttname"><a href="group__currencyapi.html#gae8a6922db493041a75e8de97c672eab5">TOKEN_NAME::Accounts</a></div><div class="ttdeci">Table&lt; N(currency), N(currency), N(account), Account, uint64_t &gt; Accounts</div><div class="ttdef"><b>Definition:</b> currency.hpp:93</div></div>
<div class="ttc" id="namespaceeos_html"><div class="ttname"><a href="namespaceeos.html">eos</a></div><div class="ttdef"><b>Definition:</b> math.hpp:8</div></div>
<div class="ttc" id="group__messagecapi_html_gaed0ef9b019ed08c7cc0241c5b4169f13"><div class="ttname"><a href="group__messagecapi.html#gaed0ef9b019ed08c7cc0241c5b4169f13">requireAuth</a></div><div class="ttdeci">void requireAuth(AccountName name)</div><div class="ttdoc">Verify specified account exists in the set of provided auths. </div></div>
<div class="ttc" id="group__messagecppapi_html_ga547d525494d3cd50fecc7ce919df5b43"><div class="ttname"><a href="group__messagecppapi.html#ga547d525494d3cd50fecc7ce919df5b43">eosio::requireNotice</a></div><div class="ttdeci">void requireNotice(AccountName name, Accounts...accounts)</div><div class="ttdoc">Verify specified accounts exist in the set of notified accounts. </div><div class="ttdef"><b>Definition:</b> message.hpp:65</div></div>
<div class="ttc" id="group__messagecppapi_html_ga82362482cd5c990d4b25708a96f72c32"><div class="ttname"><a href="group__messagecppapi.html#ga82362482cd5c990d4b25708a96f72c32">eosio::currentMessage</a></div><div class="ttdeci">T currentMessage()</div><div class="ttdoc">Interpret the message body as type T. </div><div class="ttdef"><b>Definition:</b> message.hpp:39</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
